package com.csun.cmny.provider.service.impl;

import com.csun.cmny.provider.dao.CacBaseMinorItemMapper;
import com.csun.cmny.provider.pojo.CacBaseMinorItem;
import com.csun.cmny.provider.service.CacBaseMinorItemService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("CacBaseMinorItemService")
public class CacBaseMinorItemServiceImpl implements CacBaseMinorItemService {
    @Resource
    CacBaseMinorItemMapper cacBaseMinorItemMapper;

    @Override
    public int insert(CacBaseMinorItem cacBaseMinorItem) {
        return cacBaseMinorItemMapper.insertSelective(cacBaseMinorItem);
    }

    @Override
    public int update(CacBaseMinorItem cacBaseMinorItem) {
        return cacBaseMinorItemMapper.updateByPrimaryKeySelective(cacBaseMinorItem);
    }

    @Override
    public CacBaseMinorItem selectCmiById(Integer minorItemId) {
        return cacBaseMinorItemMapper.selectByPrimaryKey(minorItemId);
    }

    @Override
    public int delById(Integer minorItemId) {
        return cacBaseMinorItemMapper.deleteByPrimaryKey(minorItemId);
    }

    @Override
    public CacBaseMinorItem selectByCmi(CacBaseMinorItem cacBaseMinorItem) {
        return cacBaseMinorItemMapper.selectByCmi(cacBaseMinorItem);
    }

    @Override
    public int delByBid(Integer bigItemId) {
        return cacBaseMinorItemMapper.delByBid(bigItemId);
    }

    @Override
    public int delByTypeId(Integer cacTypeId) {
        return cacBaseMinorItemMapper.delByTypeId(cacTypeId);
    }

    @Override
    public int insertBatch(List<CacBaseMinorItem> cacBaseMinorItemList) {
        return cacBaseMinorItemMapper.insertBatch(cacBaseMinorItemList);
    }
}
